package com.domain.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@TableName("token")
public class TokenEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@TableId(type = IdType.AUTO)
	private Long id;
	
	/**
	 * 用户id
	 */
	private Long userid;
	
	/**
	 * 用户名
	 */
	private String username;
	
	/**
	 * 表名
	 */
	private String tablename;
	
	/**
	 * 角色
	 */
	private String role;
	
	/**
	 * token
	 */
	private String token;
	
	/**
	 * 过期时间
	 */
	private Date expiratedtime;
	
	/**
	 * 登录时间
	 */
	private Date logintime;

	//维修员

	/**
	 * 家庭住址
	 */
	private String address;

	/**
	 * 性别
	 */
	private String gender;

	/**
	 * 身份证号
	 */
	private String identitycard;

	/**
	 * 手机号
	 */
	private String phonenumber;

	/**
	 * 维修工号
	 */
	private String jobnumber;

	public TokenEntity(Long userid, String username, String tablename,String role, String token, Date expiratedtime,Date logintime) {
		this.userid = userid;
		this.username = username;
		this.tablename = tablename;
		this.role = role;
		this.token = token;
		this.expiratedtime = expiratedtime;
		this.logintime = logintime;
	}

	public TokenEntity(Long userid, String username, String tablename,String role, String token, Date expiratedtime,Date logintime,String address,String gender,String identitycard,String phonenumber,String jobnumber) {
		this.userid = userid;
		this.username = username;
		this.tablename = tablename;
		this.role = role;
		this.token = token;
		this.expiratedtime = expiratedtime;
		this.logintime = logintime;
		this.address = address;
		this.gender = gender;
		this.identitycard = identitycard;
		this.phonenumber = phonenumber;
		this.jobnumber = jobnumber;
	}


}
